package cn.picclife.mwx.manager.util.enums;

import org.springframework.beans.factory.annotation.Value;

public enum ResponseStatusEnum {

	SUCCESS_CODE("200","成功"),
	FAIL_CODE("201","失败"),
	PARAM_IS_NULL("202","请求参数为空"),
	EXCEPTION("500","接口异常"),
	NOT_DATA("201","未查询到该数据"),
	PERCENT_FAIL("202","百分比不合规,请重新录入"),
	CHECK_NO_DATA("201","查询质检总数为0条"),
	UPDATE_FAIL_CODE("201","更新失败"),
	RECODE_STATE_ERROR("201","请核实录制状态是否为完成"),
	UPDATE_HTML("301","下载静态文件"),
	NOT_UPDATE_HTML("300","不下载静态文件"),
	UPDATE_JS("305","下载静态文件PNG、CSS"),
	NOT_UPDATE_JS("306","不下载静态文件PNG、CSS"),
	COMPARE("302","比对"),
	NOT_COMPARE("303","不比对"),
	VERSION("V0001","初始版本"),
	CONFIG_HTML("304","请在接入系统先配置系统页面链接"),
	AES_ERROR("203","解密失败"),
	AES_KEY("AESKEY","MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBALu/VZpH32IFRgq4RSSeSx2+u0cLsdkbLzzinzsJ+B6WX/EahT0IFAU7Y3lZ06NulnnLbZ5t7kM5ujUQmxK4F5IL6y1Nc2E6W0bOiSM/mXz0qEaXmxVhoav4AD8HlFSpxzSiEJOTzi5u5U3w4ikdiLiVOsXXGkh2jJdl3+Vl+Ko/AgMBAAECgYEAkBR3pxx9C4YsiFF9jmqEDuGuawlIhOpdyAXKWM5/wUl5e1f05C9s3c8Dub77sbJOfE1nZGvMq36DrfF+cFEilDtP2sNk0yzHrWM46VAr8KkRIWHWA7URiaIJXcb5ZMvXpCzWpC11Bw09989BF3LBI0luhugtW+h8WfAeAwIhYAECQQDfeckVxGYM7qNqA5+AQoVL/MniAQ/WaMltx0N5S51HqIhenp8p+bwWtFAOA0vd26DcbJay15Ur49Wp2BIv1rgBAkEA1xJj2DyS534d4CMxLlPRSOgGsj7KIISPfhUwscQcajX3CL4GmDmNoDsla268kj6JP3ghM5HzyzZztiWONbFiPwJARgFunqUBmvd+tY0hABrWivFLhML0ZSQ6RWtwlaS8RmBjJ9Dk509WPn6JvXoG4B8XCzXxF2E1V6RtoGERgW7wAQJBAIyZvSQ0FWW5ERbiath6eytKZHZKjiFMB/LJL5hHOLxGo0TX1b/WgDvr7r6ZGjYRI/CWPD5WgCatZmABlUKMwEkCQQCH606oeGv0KCS2fzODqwFk7jezpUOYO/lOKLnuUK2ynSbjvol1Hpt4+sTfRW0+qE+PkZTV+pktFx7yXLeGdsOk"),
	//公钥 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7v1WaR99iBUYKuEUknksdvrtHC7HZGy884p87Cfgell/xGoU9CBQFO2N5WdOjbpZ5y22ebe5DObo1EJsSuBeSC+stTXNhOltGzokjP5l89KhGl5sVYaGr+AA/B5RUqcc0ohCTk84ubuVN8OIpHYi4lTrF1xpIdoyXZd/lZfiqPwIDAQAB
	HREAD_AES_KET("ASEKEY","请求头aes加密后的key"),
    UPLOADTXTFAIL("204","上传TXT失败");
	
	
	
	 /**
     * code码
     */
    private String code;

    /**
     * 说明
     */
    private String name;

    ResponseStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getNameByCode(String code) {
        if (code == null || code.trim().length() == 0) {
            return null;
        }
        for (ResponseStatusEnum responseStatusEnum : ResponseStatusEnum.values()) {
            if (responseStatusEnum.code.equals(code)) {
                return responseStatusEnum.getName();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
